import { createI18n } from 'vue-i18n'

const messages = {
    en: {
        generateProblem: {
            title: 'Generate New Exercise',
            export_btn: 'Export',
            publish_btn: 'Publish',
            form_hint: 'Select a topic and fill out the following form to generate your math exercise',
            knowledge: 'knowledge',
            question_type: 'question type',
            quantity: 'question quantity',
            difficulty: 'difficulty',
            contextualized: 'contextualized',
            other_restriction: 'other restriction',
            placeholder: 'please select',
            contextualized_hint: 'some question are contextualized',
            other_placeholder: 'Please fill in your special requirements for generating questions here, such as: "Please try to avoid generating questions with high computational complexity."',
            generate_btn: 'Generate',
            right_placeholder: 'The generated question will be displayed here, go and try it out now! ',
            stem: 'Stem',
            alternative: 'Alternative',
            correct_answer: 'Correct Answer',
            description: 'Description (optional)',
            cancel_btn: 'Cancel',
            confirm_btn: 'Confirm'
        },
    },
    cn: {
        generateProblem: {
            title: '生成新测验',
            export_btn: '导出为',
            publish_btn: '发布测验',
            form_hint: '选择主题并填写以下表单，来生成您的数学习题',
            knowledge: '知识点',
            question_type: '题型',
            quantity: '最小问题数',
            difficulty: '难度',
            contextualized: '是否创设情境',
            other_restriction: '额外要求',
            placeholder: '请选择',
            contextualized_hint: '有部分题目会以生活情境为背景引入',
            other_placeholder: '请在此填写您对生成题目的特殊要求，如：“请尽量避免生成计算量较大的题目”',
            generate_btn: '生成',
            right_placeholder: '生成的题目会显示在这里，快去试试吧! ',
            stem: '题干内容',
            alternative: '选项',
            correct_answer: '正确选项',
            description: '答案解析（可选）',
            cancel_btn: '取消',
            confirm_btn: '保存'
        }
    }
}

const i18n = createI18n({
    legacy: false, // VUE3 组合式API
    locale: 'cn', // 默认cn语言环境
    fallbackLocale: 'en',  //备用语言环境
    messages
})

export default i18n